package jpb;

/**
 * <p>
 * A strategy to pick up the desired Java command for starting the Java process.
 *
 * <p>
 * There are different ways to find out what Java command to run. The simplest one involves just running 'java'
 * (which means this command would have to be in the OS path), more sophisticated ones may test for environment
 * variables, existence of some files/directories in the file system etc.
 *
 * @author Dariusz Kordonski
 */
public interface StartupCommandSelector
{

    /**
     * <p>
     * Return command resolved by this selector. Optionally selectors may attempt to resolve the returned command, that is
     * to verify if it will run correctly in the given environment, If unable to resolve the command in the current
     * environment, a <code>null</code>, or empty command should be returned.
     *
     * @return resolved command
     * @see CommandArg#isEmpty() 
     */
    CommandArg command();
}
